home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / utility / fdate.zip / FDATE_NT.TXT < prev    next >
Text File  |  1996-06-13  |  2KB  |  46 lines

  1. This material also appears in FDATE.DOC.
  2. I've duplicated it here in the hopes that it will
  3. catch the eye of potential NT users of Fdate.
  4.  
  5.  
  6. /V WHEN RUNNING UNDER WINDOWS NT
  7. =======================================
  8.  
  9. Early in 1996, reports began trickling in of users having difficulty
  10. with Fdate's /V feature (setting the value of an environment variable)
  11. when running under Windows NT.  To make a long story short, in many
  12. cases, Fdate's /V feature doesn't work under Windows NT.  Unfortunately,
  13. this situation cannot be corrected.  Microsoft has never made it easy to
  14. access the environment programmatically, and the situation has become
  15. worse in Windows 95 and Windows NT.  The situation has become so
  16. difficult that TurboPower Software, which markets add-on utilities, has
  17. withdrawn support for utilities that change environment variables.
  18. Since Fdate uses these utiltities, it is virtually certain that I will
  19. ever be able to make Fdate's /V feature work under NT, in cases where it
  20. does not now work.
  21.  
  22. This does not mean, however, that Fdate can't be used with NT.  What it
  23. means is that, when running Fdate under NT, we have to fall back on a
  24. more basic method of setting an environment variable.  This involves
  25. creating a temporary batch file that sets the variable, then running and
  26. deleting the batch file.  It's primitive, but it works.
  27.  
  28.  
  29. CALL A BATCH FILE
  30. =================
  31.  
  32. The most basic way to put FDATE's output into an environment variable,
  33. is to:
  34.   *  use the /P (prefix string) feature to create a DOS "SET" statement,
  35.   *  redirect the output to a batch file, and then
  36.   *  CALL the batch file.
  37.  
  38.  EXAMPLE:
  39.        FDATE /Ff /At /Occyymmdd /P"@SET FDATE=" >JUNKTEMP.BAT
  40.        call JUNKTEMP.BAT
  41.        del  JUNKTEMP.BAT
  42.  
  43. In this example, the result will be that the FDATE environment variable
  44. is set to today's date, in ccyymmdd format.
  45.  
  46.